/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nominalitzacions.domain;

import commonlib.domain.CorrectWord;
import java.io.IOException;
import java.util.ArrayList;

/**
 *
 * @author daniel.camacho.rodriguez
 */
public class CorrectWordDomainController {

    private LanguageDomainController LDC;
    private CorrectWord CW;

    private SettingsDomainController SDC;
    
    public CorrectWordDomainController(){
        CW = new CorrectWord();
    }

    public ArrayList<String> getCorrectList(String word, LanguageDomainController LDC) throws IOException{
        this.LDC = LDC;
        System.out.println("Hoalahsuohd!!");
        LDC.generateRules(5);
        System.out.println(word);
        SDC = new SettingsDomainController();
        int n = SDC.getSettings().getN();
        int k = SDC.getSettings().getK();
        ArrayList<String> als = CW.getCorrection(this.LDC.getRules(), this.LDC.getNounDictionary(), word, n, k);
        return als;
    }
    
}
